package com.team.sion.mapper;

import com.team.sion.pojo.SongList_song;
import com.team.sion.pojo.SongList_songExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface SongList_songMapper {
    long countByExample(SongList_songExample example);

    int deleteByExample(SongList_songExample example);

    @Delete({
        "delete from songlist_song",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    @Insert({
        "insert into songlist_song (id, song_id, ",
        "songList_id, user_id, ",
        "type, createTime)",
        "values (#{id,jdbcType=INTEGER}, #{songId,jdbcType=INTEGER}, ",
        "#{songlistId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, ",
        "#{type,jdbcType=VARCHAR}, #{createtime,jdbcType=DATE})"
    })
    int insert(SongList_song row);

    int insertSelective(SongList_song row);

    List<SongList_song> selectByExample(SongList_songExample example);

    @Select({
        "select",
        "id, song_id, songList_id, user_id, type, createTime",
        "from songlist_song",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @ResultMap("com.team.sion.mapper.SongList_songMapper.BaseResultMap")
    SongList_song selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("row") SongList_song row, @Param("example") SongList_songExample example);

    int updateByExample(@Param("row") SongList_song row, @Param("example") SongList_songExample example);

    int updateByPrimaryKeySelective(SongList_song row);

    @Update({
        "update songlist_song",
        "set song_id = #{songId,jdbcType=INTEGER},",
          "songList_id = #{songlistId,jdbcType=INTEGER},",
          "user_id = #{userId,jdbcType=INTEGER},",
          "type = #{type,jdbcType=VARCHAR},",
          "createTime = #{createtime,jdbcType=DATE}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(SongList_song row);
}